<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE HTML>

<ui:composition template="/dinamic/template/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="conteudo">

		<div align="center">
			<h:form>

				<p:panel header="#{mensagem['filtro.gerar.ponto']}#{pontoManagedBean.funcionario.nome}">
					<div align="center">

						<h:panelGrid columns="2" cellpadding="3">

							<h:outputLabel styleClass="name" value="#{mensagem['usuario.nome']}:" />
							<h:outputLabel value="#{pontoManagedBean.funcionario.nome}" />

							<h:outputLabel styleClass="name" value="#{mensagem['usuario.email']}:" />
							<h:outputLabel value="#{pontoManagedBean.funcionario.email}" />

							<h:outputLabel styleClass="name" value="#{mensagem['usuario.departamento']}:" />
							<h:outputLabel value="#{pontoManagedBean.funcionario.departamento}" />
							
						</h:panelGrid>
						
						<p:panel style="width:300px;">
							<div align="center">
								<h:panelGrid columns="2" cellpadding="3">
									<h:outputLabel styleClass="name" value="#{mensagem['horario.atual']}:" />
									<p:clock pattern="HH:mm:ss" mode="server" />
									<h:outputLabel styleClass="name" value="#{mensagem['data.relatorio.analitico']}:" />
									<p:clock pattern="dd/MM/yyyy" mode="server" />
								</h:panelGrid>
							</div>
						</p:panel>


						<p:separator />
						<h:panelGrid id="botoes" columns="3" cellspacing="2">
							<p:commandButton
								value="#{mensagem['gerar.entrada']}" 
								action="#{pontoManagedBean.gerarEntrada()}" 
								rendered="#{pontoManagedBean.validarEntrada()}" 
								update="botoes" 
								/>
							<p:commandButton 
								value="#{mensagem['gerar.intervalo']}"	
								action="#{pontoManagedBean.gerarIntervalo()}" 
								rendered="#{pontoManagedBean.validarIntervalo() and !pontoManagedBean.validarEntrada()}" 
								update="botoes" 
								/>
							<p:commandButton 
								value="#{mensagem['gerar.saida']}"	
								action="#{pontoManagedBean.gerarSaida()}" 
								rendered="#{pontoManagedBean.validarSaida() and !pontoManagedBean.validarEntrada()}" 
								update="botoes"
								/>
						</h:panelGrid>
					</div>
				</p:panel>
			</h:form>
		</div>
	</ui:define>
</ui:composition>